<%@ Control Language="C#" AutoEventWireup="true" CodeFile="doctorSearchControl.ascx.cs"
    Inherits="Doctor_doctorSearchControl" %>
<%-- <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>--%>

<script>

    //<![CDATA[ 
 

<%if (IsPostBack)
  {%>
   // showWorking();
    //workingWin.close(); 
      <%} %>
    function <%=this.ClientID%>chkError() {
        arr = new Array(
        document.getElementById('<%=txtLName.ClientID%>'),
       document.getElementById('<%=txtFName.ClientID%>'),
       <%if (this.fromPage != null && this.fromPage != "" && this.fromPage.ToString() == "RateDoctors")
         { %>
       document.getElementById('<%=ddlhospital.ClientID%>'),
       document.getElementById('<%=ddlInsurance.ClientID%>'),
       <%} %>
       document.getElementById('<%=ddlState.ClientID%>'),
        document.getElementById('<%=txtCity.ClientID%>'),
        document.getElementById('<%=txtZipCode.ClientID%>'),
        document.getElementById('<%=ddlSpeciality.ClientID%>'))
        count = 0;
        for (i = 0; i < arr.length; i++) {
            if (trim(eval(arr[i]).value) != "0" && trim(eval(arr[i]).value) != "") {
                count++;
            }
        }
        if (count < 2) {
            alert("Please select atleast 2 conditions for search");
            return false;
        }
        if (chkMinLen(document.getElementById('<%=txtCity.ClientID%>'), 3))
            if (chkMinLen(document.getElementById('<%=txtZipCode.ClientID%>'), 5))
                if (chkMinLen(document.getElementById('<%=txtLName.ClientID%>'), 3))
                   if (chkMinLen(document.getElementById('<%=txtFName.ClientID%>'), 1)) {
                     // showWorking();
                       return true;
                   }
                   else
                       return false;
               else
                   return false;
           else
               return false;
       else
           return false;
      // showWorking();
       return true;
   }
   //]]>
</script>

    <asp:HiddenField ID="hfIsToShowMessage" runat="server" />
                 
        <table cellpadding="1" cellspacing="0" border="0" width="100%">            
            <tr>
                <td style="width: 80px;">
                    &nbsp;First Name :
                </td>
                <td style="width: 10px;">
                </td>
                <td>
                    <asp:TextBox ID="txtFName" runat="server" Width="148px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;Last Name :
                </td>
                <td style="width: 10px">
                </td>
                <td>
                    <asp:TextBox ID="txtLName" runat="server" Width="148px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="height: 22px;" nowrap="true">
                    &nbsp;Major Specialty :
                </td>
                <td style="height: 22px; width: 10px;">
                </td>
                <td style="height: 22px">
                    <div class="styled-select" style="width: 150px">
                        <asp:DropDownList Width="170px" runat="server" ID="ddlSpeciality">
                        </asp:DropDownList>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="height: 22px;" nowrap="true">
                    &nbsp;Country :
                </td>
                <td style="height: 22px; width: 10px;">
                </td>
                <td style="height: 22px">
                    <div class="styled-select" style="width: 150px">
                        <asp:DropDownList Style="width: 170px" runat="server" ID="ddlCountry" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged"
                            AutoPostBack="True">
                        </asp:DropDownList>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="width: 80px;">
                    &nbsp;State/Province :
                </td>
                <td style="width: 10px;">
                </td>
                <td>
                    <div class="styled-select" style="width: 150px">
                        <asp:DropDownList ID="ddlState" runat="server" Style="width: 170px" />
                    </div>
                </td>
            </tr>
            <tr>
                <td style="width: 80px; height: 24px;">
                    &nbsp;City :
                </td>
                <td style="width: 10px; height: 24px;">
                </td>
                <td style="height: 24px">
                    <asp:TextBox ID="txtCity" runat="server" Width="148px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    &nbsp;OR
                </td>
            </tr>
            <tr>
                <td style="width: 80px; height: 24px;">
                    &nbsp;Zip Code :
                </td>
                <td style="width: 10px; height: 24px;">
                </td>
                <td style="height: 24px">
                    <asp:TextBox ID="txtZipCode" runat="server" Width="148px"></asp:TextBox>
                </td>
            </tr>
            <tr runat="server" id="tr_Hospital" visible="false">
                <td style="width: 80px; height: 22px;">
                    &nbsp;Hospital :
                </td>
                <td style="height: 22px; width: 10px;">
                </td>
                <td style="height: 22px">
                    <div class="styled-select" style="width: 150px">
                        <asp:DropDownList ID="ddlhospital" runat="server" Style="width: 170px" />
                    </div>
                </td>
            </tr>
            <tr runat="server" id="tr_Insurance" visible="false">
                <td style="width: 80px; height: 22px;">
                    &nbsp;Insurance :
                </td>
                <td style="height: 22px; width: 10px;">
                </td>
                <td style="height: 22px">
                    <div class="styled-select" style="width: 150px">
                        <asp:DropDownList ID="ddlInsurance" runat="server" Style="width: 170px" />
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="float: right">
                    <br />
                    <asp:Button ID="btnSubmit" runat="server" Text="Search" CssClass="buttonclass" OnClick="btnSubmit_Click"
                        CausesValidation="false" />
                    <br />
                </td>
            </tr>
        </table>
    
   

<script>
    try {
        //workingWin.close();
    } catch (e) 
    {
   
     }
</script>

